/* pages/chat/chat.wxss */
.container {
  height: 100vh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #32A9F5 0%, #FFFFFF 60%)
}

.guide{
  display: flex;
  align-items: center;
  margin-left: 46rpx;

  .icon {
    width: 25.22rpx;
    height: 30rpx;
  }
  .title{
    font-size: 32rpx;
    color: #fff;
    margin-left: 15.78rpx;
  }
  .change{
    display: flex;
    align-items: center;
    margin-left: 12rpx;
    .icon{
      width: 18rpx;
      height: 19.9rpx;
    }
    .tip{
      font-size: 20rpx;
      color:#fff;
      margin-left: 10rpx;
    }
  }
}

.list {
  width: 100%;
  box-sizing: border-box;
  padding: 40rpx 35rpx 0;
  flex: 1;
  overflow: hidden;

  scroll-view{
    height: 100%;
  }

  .item {
    width: 100%;
    overflow: hidden;
    display: flex;
    padding-bottom: 20rpx;
    
    .dialog{
      width: 100%;

      .info{
        display: flex;

        .head {
          width: 60rpx;
          height: 60rpx;
          background: rgba(255, 255, 255, 0.6);
          border-radius: 30rpx;
          display: flex;
          align-items: center;
          justify-content: center;

          image{
            width: 45.67rpx;
            height: 42.33rpx;
            margin-top: 5rpx;
          }
        }

        .content {
          flex: 1;
          overflow: hidden;
          background: none;
          margin: 0 20rpx;
          display: flex;
        }
      }

      // 提问
      &.user {
        .info{
          flex-direction: row-reverse;
        }
        .content {
          text-align: right;
          justify-content: flex-end;
          .card{
            text-align: left;
          }
          .chat-box{
            text-align: left;
          }
        }
      }
    }

    // 追问
    .problemBox {
      margin: 5rpx 0 0 80rpx;
      flex-wrap: wrap;

      .problem {
        display: flex;
        align-items: center;
        height: 52rpx;
        max-width: max-content;
        border-radius: 30rpx;
        padding: 0 28rpx;
        margin-top: 15rpx;
        color: #434343;
        font-size: 28rpx;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        background: rgba(255, 255, 255, 0.6);
      }
    }
  }

  .chat-box{
    border-radius: 20rpx;
    padding: 10rpx 20rpx;
    background: #f6f6f6;
    font-size: 32rpx;
    max-width: 100%;
    overflow:hidden;
    color: #333;
    line-height: 1.8;
  }

  .card{
    background: #f6f6f6;
    border-radius: 14rpx;
    overflow:hidden;
    &.card-common{
      width: 560rpx;
    }
    &.card-pic{
      width: 548rpx;
      image{
        width: 100%;
        height: 250rpx;
      }
    }
    &.card-video{
      width: 548rpx;
      
      .video {
        height: 265rpx;
        overflow: hidden;
        .video-media{
          height: 100%;
          padding: 0;
          margin: 0;
        }
      }
    }
    &.card-recommend{
      width: 560rpx;
      .l{
        display: flex;
        gap: 18rpx;
        margin-bottom: 36rpx;
        &:nth-last-child(1){
          margin-bottom: 0;
        }
  
        .l-avatar{
          width: 108rpx;
          height: 108rpx;
          border-radius: 24rpx;
          overflow: hidden;
          flex-shrink: 0;
        }
        .l-info{
          .title{
            color: #32A9F5;
            font-size: 32rpx;
            font-weight: 500;
            &.hot{
              color: #32A9F5;
            }
          }
          .author{
            font-size: 24rpx;
          }
          .hotnum{
            font-size: 20rpx;
          }
        }
      }
    }
    &.card-train{
      .t{
        font-size: 20rpx;
        color: #969696;
        margin-bottom: 10rpx;
        &.space{
          margin-top: 26rpx;
        }
      }
      .q{
        color: #474747;
        font-size: 28rpx;
        font-weight: 500;
      }
      .a{
        font-size: 28rpx;
        color: #000;
        font-weight: 400;
      }
    }
    &.card-list{
      .card-content{
        padding: 10rpx 24rpx;
      }
      .list-item{
        display: flex;
        justify-content: space-between;
        padding: 20rpx 0;
        border-bottom: 1px #CDCDCD solid;
        align-items: center;
        &:nth-last-child(1){
          border: 0rpx;
        }
        .l{
          font-size: 32rpx;
          flex: 1;
          padding: 0 10rpx 0 0;
        }
        .button{
          width: 110rpx;
          height: 44rpx;
          flex-basis: 110rpx;
          background:#32A9F5;
          border-radius: 55rpx;
          display: flex;
          align-items: center;
          justify-content: center;
          color: #fff;
        }
      }
    }
    .card-header{
      height: 80rpx;
      line-height: 80rpx;
      background: #32A9F5;
      color: #fff;
      padding: 0 25rpx;
      font-size: 32rpx;
    }
    .card-content{
      font-size: 28rpx;
      padding: 32rpx 28rpx 28rpx;
    }
    .card-button{
      height: 65rpx;
      margin: 0 26rpx 30rpx;
      box-sizing: border-box;
      background: #32A9F5;
      color: #fff;
      border-radius: 16rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28rpx;
    }
  }
}

.fixedvoiec {
  width: 52rpx;
  height: 52rpx;
  padding-right: 2rpx;
  padding-top: 2rpx;
  background-color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  right: 5.2%;
  top: 1.4%;

  .voice,
  .novoice {
    position: relative;
    width: 42rpx;
    height: 42rpx;
    display: flex;
    justify-content: center;
    align-items: center;

    image {
      width: 100%;
      height: 100%;
    }
  }
}

.footer {
  width: 100%;
  height: 200rpx;
  box-sizing: border-box;
  padding: 0rpx 25rpx 0rpx 25rpx;
  background-color: #fff;
  transition: height 0.2s linear;

  &.large{
    height: 550rpx;
  }

  .contentbox {
    width: 100%;
    height: 180rpx;
    display:flex;
    flex-direction: column;

    .enter{
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .tips{
      display: flex;
      flex: 1;
      font-size: 20rpx;
      align-items: center;
      justify-content: center;
      color: #717171;
    }
    
    .type {
      width: 70rpx;
      height: 70rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 12rpx;

      .tagimage {
        width: 100%;
        height: 100%;
      }
    }

    .content {
      height: 70rpx;
      overflow: hidden;
      border-radius: 16rpx;
      border: 1px solid rgba(195, 195, 195, 0.5);
      background: rgba(255, 255, 255, 0.5);
      box-sizing: border-box;
      flex: 1;

      .textarea {
        height: 68rpx;
        line-height: 68rpx;
        max-height: 100%;
        padding-left: 16rpx;
        font-size: 28rpx;
      }
    }

    .send {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100rpx;
      height: 70rpx;
      color: white;
      border-radius: 8rpx;
      font-size: 28rpx;
      background-image: linear-gradient(to top, #1B86F1FF, #32A9F5FF);
      margin-left: 12rpx;
    }
  }

  .microphone {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 370rpx;

    .wait {
      width: 0rpx;
      height: 40rpx;
      z-index: 10;
      border-radius: 12rpx;
      margin-bottom: 10rpx;
      position: relative;
      overflow: hidden;
      margin-bottom: 10rpx;

      &.animateWidth{
        animation: width 2s linear forwards;
      }
    }

    .microphone-text {
      height: 40rpx;
      font-size: 32rpx;
      color: #717171;
      margin-bottom: 10rpx;
    }

    .microphone-image {
      width: 205rpx;
      height: 205rpx;

      image {
        width: 100%;
        height: 100%;
      }
    }
  }
}

@keyframes width {
  from {
    width: 0rpx;
  }
  to {
    width: 645rpx;
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

//5.5
.card-all{
  .card-content{
    margin: 0 20rpx;
    border-bottom: 1px #e9e9e9 solid;
    .title{
      font-size: 32rpx;
      color:#32A9F5;
    }
    .list{
      padding: 20rpx 0 0;
      .item{
        flex-direction: column;
        .inner-title{
          font-size: 32rpx;
        }
        .inner-tag{
          font-size: 24rpx;
          color: #808080;
          margin-top: 10rpx;
        }
        .inner-summary{
          font-size: 24rpx;
          color: #afafaf;
          margin-top: 10rpx;
        }
      }
    }
  }
}